<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    
</head>
<body>
    <h1>123</h1>
    <!-- <script>
        console.log(123)
        var xhr =  new XMLHttpRequest()
      xhr.open('get','/api/goods?name=zs&age=19")
      xhr.send()
      xhr.onload = function(){
        window.console.log(xhr.responseText)
      }
    </script> -->
    <script>
      var xhr = new XMLHttpRequest()
      xhr.open('post','/api/goods')
      xhr.setRequestHeader('Content-Type','appplication/json')
      var params = {'name':'zs'}
      xhr.send(params)
      xhr.onload = function(){
          console.log(xhr.responseText)
      }
    </script>
</body>
</html>